from django.db import models
from mdeditor.fields import MDTextField

class Article(models.Model):
    title = models.CharField(max_length=100)
    content = MDTextField()  # 使用MDTextField代替TextField
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    def __str__(self):
        return self.title
